import Vue from 'vue';
import VueI18n from 'vue-i18n';

import * as lang_ina from '../assert/lang/in';
import * as lang_en from '../assert/lang/en';
import * as lang_zh from '../assert/lang/cn-zh';
import * as lang_zht from '../assert/lang/cn-t';
import * as lang_zhx from '../assert/lang/cn-x';
import * as lang_vie from '../assert/lang/vietnam';


Vue.use(VueI18n);

const messages = {
    en: lang_en,
    ina: lang_ina,
    zh: lang_zh,
    zht: lang_zht,
    mys: lang_zht,
    zhx: lang_zhx,
    vie: lang_vie,
};

let locale = localStorage.getItem('lang')||'en'
export  const i18n = new VueI18n({
    locale: locale,  // set locale
    messages  // set locale messages
});
